<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simRuckigPos</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simRuckigPos" id="simRuckigPos"></a>simRuckigPos / sim.ruckigPos </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Executes a call to the <a href="https://github.com/pantor/ruckig#readme">Ruckig online trajectory generator</a>. The Ruckig online trajectory generator provides instantaneous trajectory generation capabilities for motion control systems. This function prepares a  position-based trajectory generation object, that can then be calculated with <a href="simRuckigStep.htm">sim.ruckigStep</a>. When this object is not needed anymore, remove it with <a href="simRuckigRemove.htm">sim.ruckigRemove</a>. See also <a href="simRuckigVel.htm">sim.ruckigVel</a>, <a href="simMoveToPose.htm">sim.moveToPose</a> and <a href="simMoveToConfig.htm">sim.moveToConfig</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simRuckigPos(simInt dofs,simDouble smallestTimeStep,simInt flags,const simDouble* currentPos,const simDouble* currentVel,const simDouble* currentAccel,const simDouble* maxVel,const simDouble* maxAccel,const simDouble* maxJerk,const simBool* selection,const simDouble* targetPos,const simDouble* targetVe,simDouble* reserved1,simInt* reserved2l)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>dofs</strong>: the number of degrees of freedom (N).</div>
<div><strong>smallestTimeStep</strong>: the smallest expected cycle time. Use a value of 0.0001 (0.1ms).</div>
<div><strong>flags</strong>: <a href="../apiConstants.htm#ruckigFunctions">Ruckig flags</a>. -1 for default flags.</div>
<div><strong>currentPos</strong>: the current position (one value for each DoF)</div>
<div><strong>currentVel</strong>: the current velocity (one value for each DoF)</div>
<div><strong>currentAccel</strong>: the current acceleration (one value for each DoF)</div>
<div><strong>maxVel</strong>: the maximum allowed velocity (one value for each DoF)</div>
<div><strong>maxAccel</strong>: the maximum allowed acceleration (one value for each DoF)</div>
<div><strong>maxJerk</strong>: the maximum allowed jerk (one value for each DoF)</div>
<div><strong>selection</strong>: the selection vector (one value for each DoF). For a default behaviour, fill the vector with non-zero values.</div>
<div><strong>targetPos</strong>: the  target position (one value for each DoF)</div>
<div><strong>targetVel</strong>: the  target velocity (one value for each DoF)</div>
<div><strong>reserved1</strong>: reserved. Set to nullptr</div>
<div><strong>reserved2</strong>: reserved. Set to nullptr</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>A negative value in case of an error, otherwise the handle of the created object</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int handle=sim.ruckigPos(int dofs,float smallestTimeStep,int flags,table[] currentPosVelAccel,table[] maxVelAccelJerk,table[] selection,table[] targetPosVel)
<br>
<br>

<div>If you wish to use this function in a blocking mode, consider using <a href="simMoveToPose.htm">sim.moveToPose</a> and <a href="simMoveToConfig.htm">sim.moveToConfig</a> instead.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>Similar to the C-function counterpart</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
